import {createRouter, createWebHistory} from "vue-router";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        //这里放入路由，例如：
        {
            path: '/',
            name: 'display',
            component: () => import('../pages/displayPage.vue'),
            children: [
                {
                    path: '/',
                    name: 'basic-info',
                    component: () => import('../pages/subRoutes/basic-info.vue')
                },
                {
                    path: '/admission',
                    name: 'admission',
                    component: () => import('../pages/subRoutes/admission.vue')
                },
                {
                    path: '/team',
                    name: 'team',
                    component: () => import('../pages/subRoutes/team.vue')
                },
                {
                    path: '/contact',
                    name: 'contact',
                    component: () => import('../pages/subRoutes/contact.vue')
                },
                {
                    path: '/research',
                    name: 'research',
                    component: () => import('../pages/subRoutes/research.vue')
                },
                {
                    path: '/teaching',
                    name: 'teaching',
                    component: () => import('../pages/subRoutes/teaching.vue')
                }
            ]
        },
        {
            path: '/edit',
            name: 'edit',
            component: () => import('../pages/editPage.vue'),
            children: [
                {
                    path: '',
                    name: 'basic-info-data-default',
                    component: () => import('../pages/editSubRoutes/basic-info-data.vue')
                },
                {
                    path: '/basic-info-data',
                    name: 'basic-info-data',
                    component: () => import('../pages/editSubRoutes/basic-info-data.vue')
                },
                {
                    path: '/photoData',
                    name: 'photoData',
                    component: () => import('../pages/editSubRoutes/photoData.vue')
                },
                {
                    path: '/memberData',
                    name: 'memberData',
                    component: () => import('../pages/editSubRoutes/memberData.vue')
                }
            ]
        }

    ]
})

export default router;